package GUILayer;

import javax.swing.JPanel;
import java.awt.BorderLayout;
import javax.swing.JTabbedPane;
import GUIHelper.FacilityPanel;
import GUIHelper.ActivityPanel;

public class ActivityGUI extends JPanel {

	private static final long serialVersionUID = 1L;
	private JTabbedPane tab;
	private JPanel panel_facility;
	private JPanel panel_instructor;
	private JPanel panel_activities;
	private JPanel panel_bookings;
	private int authLevel;

	public ActivityGUI() {
		authLevel = LoginUI.getLoggedInPosition();

		setLayout(new BorderLayout(0, 0));

		tab = new JTabbedPane(JTabbedPane.TOP);
		add(tab, BorderLayout.CENTER);

		if (authLevel == 1 || authLevel == 2 || authLevel == 3
				|| authLevel == 4) {
			panel_facility = new FacilityPanel();
			tab.addTab("Facilities", null, panel_facility, null);

			panel_instructor = new JPanel();
			tab.addTab("Instructors", null, panel_instructor, null);

			panel_activities = new ActivityPanel();
			tab.addTab("Activities", null, panel_activities, null);
		}
		panel_bookings = new JPanel();
		tab.addTab("Bookings", null, panel_bookings, null);
	}

}
